package org.mine.design.bridge.service.impl;

import org.mine.design.bridge.service.PayFeeService;
import org.mine.design.bridge.service.PayFreeAbstract;
import org.springframework.stereotype.Component;

@Component
public class PayFreeImpl extends PayFreeAbstract {

    @Override
    public int payFree(PayFeeService payFeeService, Boolean publicGood, int commodityPrices) {

        if (!publicGood) {
            return payFeeService.calc(commodityPrices);
        }
        return 0;
    }
}
